public class KinID
{
	final static int PROVIDED_TO_STUDENT = 1;
	final static int SOURCE_FILE = 2;
	final static int CLASS_FILE = 4;
	final static int INSTRUCTION = 8;
	final static int SCORE_CRITERIA = 16;
	final static int IO = 32;

	public static int instr()
	{
		return PROVIDED_TO_STUDENT | INSTRUCTION;
	}

	public static int provided_io()
	{
		return PROVIDED_TO_STUDENT | IO;
	}

	public static int test_io()
	{
		return IO;
	}

	public static int scoring()
	{
		return SCORE_CRITERIA;
	}

	public static int source_file()
	{
		return PROVIDED_TO_STUDENT | SOURCE_FILE;
	}

	public static int class_file()
	{
		return PROVIDED_TO_STUDENT | CLASS_FILE;
	}

	public static int ApeFileID(int val)
	{
		if (val == ApeProblem.PINPUT || val == ApeProblem.POUTPUT)
			return provided_io();
		if (val == ApeProblem.TINPUT || val == ApeProblem.TOUTPUT)
			return test_io();
		if (val == ApeProblem.INSTR)
			return instr();
		if (val == ApeProblem.CRITERIA)
			return scoring();

		return 0 - val;
	}
}
